package io.renren.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 学习资料
 * 
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2021-10-11 14:39:50
 */
@Data
@TableName("jx_study_file")
public class JxStudyFileEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 学习资料id
	 */
	@TableId
	private Long id;
	/**
	 * 资料名称
	 */
	@NotBlank(message="请填写资料名称", groups = {AddGroup.class, UpdateGroup.class})
	private String fileName;
	/**
	 * 文件类型
	 */
	@NotBlank(message="请选择上传文件类型", groups = {AddGroup.class, UpdateGroup.class})
	private String fileType;
	/**
	 * 文件地址
	 */
	@NotBlank(message="请先上传文件", groups = {AddGroup.class, UpdateGroup.class})
	private String fileUrl;
	/**
	 * 文件后缀
	 */
	private String filePostfix;
	/**
	 * 资料介绍
	 */
	@NotBlank(message="请填写资料介绍", groups = {AddGroup.class, UpdateGroup.class})
	private String fileDesc;
	/**
	 * 对应课程的id
	 */
	@NotNull(message="请填写对应课程", groups = {AddGroup.class, UpdateGroup.class})
	private Long courseId;
	/**
	 *
	 */
	@NotNull(message="请填写排列的序号", groups = {AddGroup.class, UpdateGroup.class})
	private Integer  orderNum;

	/**
	 * 课程名
	 */
	@TableField(exist=false)
	private String  courseName;

	/**
	 * 创建时间
	 */
	private Date createTime;

}
